package com.chuangjiangx.member.manager.common;

import com.chuangjiangx.member.manager.basic.web.request.Page;
import com.chuangjiangx.partner.platform.common.basic.QueryCondition;


/**
 * 前向接口分页工具类.
 */
public class PageUtils {

    /**
     * 复制分页信息到{@link QueryCondition}对象.
     *
     * @param queryCondition 分页查询对象
     * @param page           前端分页对象
     */
    public static void copyPage(QueryCondition queryCondition, Page page) {
        if (page == null) {
            page = new Page();
        }
        queryCondition.setPageNumber(page.getPageNO());
        queryCondition.setPageSize(page.getEveryPageCount());
    }
}
